﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty.TK
{
    class Class2
    {
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {


            if (ppa.Period > 0 && ppa.Age <= 60)
            {
                IPolicy policy = ppa.PolicyActing.Policy;

                switch (policy.PaymentPeriodLength)
                {
                    case 1:
                        da.Value = ppa.Amount * 0.0225;
                        break;
                    case 5:
                        da.Value = ppa.Amount * 0.08;
                        break;
                    default:
                        da.Value = ppa.Amount * 0.15;
                        break;
                }
            }

        }
    }
}
